package test.sunyu.storm.demo.demo2;

import org.apache.storm.topology.BasicOutputCollector;
import org.apache.storm.topology.OutputFieldsDeclarer;
import org.apache.storm.topology.base.BaseBasicBolt;
import org.apache.storm.tuple.Tuple;
import org.slf4j.Logger;
import sunyu.kit.common.LogKit;

/**
 * @author 孙宇
 */
public class SenqueceBolt extends BaseBasicBolt {

    private static final Logger logger = LogKit.getLogger();

    @Override
    public void execute(Tuple tuple, BasicOutputCollector basicOutputCollector) {
        String word = (String) tuple.getValue(0);
        String out = "I'm " + word + "!";
        logger.debug(out);
    }

    @Override
    public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) {

    }
}
